package com.android.happymall.model.member.query;

import com.android.happymall.model.ParentDataCallback;
import com.google.gson.Gson;

import okhttp3.Response;

/**
 * 自定义回调，每个bean都写一个
 * Created by wzq on 2016/9/1.
 */
public abstract class QueryDataCallback extends ParentDataCallback<QueryPojo> {

    @Override
    public QueryPojo parseNetworkResponse(Response response, int id) throws Exception {
        String string = response.body().string();
        QueryPojo queryPojo = new Gson().fromJson(string, QueryPojo.class);
        return queryPojo;
    }
}
